﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace File_Operate_Program
{
    public partial class FrmCSV_EditorOriginalData : Form
    {
        public CCurrentCSVFile cCurrentCSVFile = new CCurrentCSVFile();
        public FrmCSV_EditorOriginalData()
        {
            InitializeComponent();
            this.StartPosition = FormStartPosition.CenterScreen;
        }

        private void FrmCSV_EditorOriginalData_Load(object sender, EventArgs e)
        {
            foreach (var FileDataItem in cCurrentCSVFile.FileData)
            {
                if (FileDataItem == cCurrentCSVFile.FileData.Last())
                {
                    RTxtOriginalData.AppendText($"{FileDataItem.RowData}");
                }
                else
                {
                    RTxtOriginalData.AppendText($"{FileDataItem.RowData}\n");
                }
            }
        }
    }
}
